import { createRouter, createWebHashHistory } from "vue-router";
import { navData } from "@/untils/nav.js";
import Index from "@/components/Index.vue";
const routes = [
    {
        path: '/',
        name: 'Index',
        component: Index,
    }
];
navData.forEach((e) => {
    routes.push({ 
        path: e.path,
        name: e.name,
        component: () => import("@/" + e.component),
        props: e.props
    });
});

const router = createRouter({
    history: createWebHashHistory(),
    routes
});

export default router;